package com.webproject.dao.impl.employeeManager;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.webproject.core.Page;
import com.webproject.dao.employeeManager.EmployeeManagerDao;
import com.webproject.entity.emplayeeManager.Attence;
import com.webproject.entity.emplayeeManager.Employee;
import com.webproject.entity.emplayeeManager.WorkPlan;

public class EmployeeManagerDaoImpl extends SqlMapClientDaoSupport implements EmployeeManagerDao{

	@Override
	public List<Employee> queryEmployee(Page page) {
		// TODO Auto-generated method stub
		return getSqlMapClientTemplate().queryForList("employeeManager.queryEmployee",page);
	}

	@Override
	public int queryEmployeeCount(Page page) {
		// TODO Auto-generated method stub
		return (Integer) getSqlMapClientTemplate().queryForObject("employeeManager.queryEmployeeCount", page);
	}

	@Override
	public void saveEmployee(Employee employee) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().insert("employeeManager.saveEmployee", employee);
	}

	@Override
	public void updateEmployee(Employee employee) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().update("employeeManager.updateEmployee", employee);
	}

	@Override
	public List<WorkPlan> queryWorkPlan(Page page) {
		// TODO Auto-generated method stub
		return getSqlMapClientTemplate().queryForList("employeeManager.queryWorkPlan", page);
	}

	@Override
	public int queryWorkPlanCount(Page page) {
		// TODO Auto-generated method stub
		return (Integer) getSqlMapClientTemplate().queryForObject("employeeManager.queryWorkPlanCount", page);
	}

	@Override
	public void saveWorkPlan(WorkPlan workPlan) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().insert("employeeManager.saveWorkPlan", workPlan);
	}

	@Override
	public void updateWorkPlan(WorkPlan workPlan) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().update("employeeManager.updateWorkPlan", workPlan);
	}

	@Override
	public void deleteWorkPlan(WorkPlan workPlan) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().delete("employeeManager.deleteWorkPlan", workPlan);
	}

	@Override
	public List<Attence> queryAttence(Page page) {
		// TODO Auto-generated method stub
		return getSqlMapClientTemplate().queryForList("employeeManager.queryAttence", page);
	}

	@Override
	public int queryAttenceCount(Page page) {
		// TODO Auto-generated method stub
		return (Integer) getSqlMapClientTemplate().queryForObject("employeeManager.queryAttenceCount", page);
	}

	@Override
	public void saveAttence(Attence attence) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().insert("employeeManager.saveAttence", attence);
	}

	@Override
	public void updateAttence(Attence attence) {
		// TODO Auto-generated method stub
		getSqlMapClientTemplate().update("employeeManager.updateAttence", attence);
	}

}
